EXT PANEL面板的刷新相关【转】

您所在的位置:网站首页 ext panel重新渲染 EXT PANEL面板的刷新相关【转】

EXT PANEL面板的刷新相关【转】

2024-03-01 13:58| 来源: 网络整理| 查看: 265

一、

引用页刷新的问题不仅仅体现在TabPanel里,只要是带load的panel都是适用的~怎么让一个panel去刷新和更新呢?

更新的话很容易,只要调用Ext.Panel.load()就可以,panel会自动用load方法里的参数去更新panel。load的官方描述如下:load( Object/String/Function config ) : Ext.Panel Loads this content panel immediately with content returned from an XHR call. 那么按理说,我们要刷新的话,只要用load方法,传进原来的参数就可以实现刷新了,但是对于TabPanel 这种,panel 很多,ExtJS的Panel 本身没有得到URL的方法,自己记录管理URL又太麻烦,要是能让他有reload方法就好了。

其实是可以reload的,只是这个方法不在Panel里,往下看!我们先来看一下,panel 是用什么去ajax加载引用另一个页面的。我们看下Panel的autoLoad,对于autoLoad 的官方描述如下:autoLoad : Object/String/Function A valid url spec according to the Updater Ext.Updater.update method. If autoLoad is not null, the panel will attempt to load its contents immediately upon render.The URL will become the default URL for this panel's



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3